﻿namespace FluentBinding.WinForms.Domain
{
    public class CustomerStatusConvertor : ITypeConvertor<CustomerStatus, bool>
    {
        #region Fields

        static public readonly CustomerStatusConvertor Instance = new CustomerStatusConvertor();

        #endregion

        #region ITypeConvertor<CustomerStatus,bool> Members

        public bool Convert(CustomerStatus value)
        {
            return value == CustomerStatus.Active;
        }

        public CustomerStatus Convert(bool value)
        {
            return value ? CustomerStatus.Active : CustomerStatus.Inactive;
        }

        #endregion
    }
}